import { post, get } from "@/utils/request";

const module = {
  //订单列表
  orderList: (params) => get("/order/page", params),

  //订单详情
  orderDetail: (params) => get("/order/detail", params),

  //发起退款
  refund: (data) => post("/afterSale/save", data),

  //获取退款原因
  getRefundReson: (params) => get("/afterSale/afterSaleReason", params),

  //评价订单
  evaluateOrder: (data) => post("/order/batchEvaluate", data),

  //取消订单
  cancleOrder: (data) => post("/order/cancel", data),

  //券码
  getTicket: (params) => get("/order/item/ticket", params),

  //券码详情
  getTicketDetail: (data) => post("/writeoff/ticket", data),

  //核销
  takeWriteOff: (data) => post("/writeoff/take", data),

  //摄像头列表
  getCameraList: (params) => get("/camera/list", params),

  //摄像头详情
  getCamreaDetail: (params) => get("/camera/detail", params),

  //售后列表
  getAfterSalePage: (params) => get("/afterSale/page", params),

  //申请售后后订单信息
  getAfterSaleInfo: (params) => get("/afterSale/detail", params),

  //取消售后
  cancelAfterSale: (params) => get("/afterSale/cancel", params),
};

export default module;
